from SocketServer import (TCPServer as TCP,
	StreamRequestHandler as SRH)

from time import ctime

class MyHandler(SRH):
	def handler(self):
		print '... connected from:',self.client_address
		self.wfile.write('[%s] %s' %(ctime(),self.rfile.readline()))


tcpServ = TCP(('',21567),MyHandler)
print 'waiting for connection...'
tcpServ.serve_forever()